package com.eurake.seckill.controller;

import com.eurake.seckill.rabbitmq.MQSender;
import com.eurake.seckill.vo.RespBean;
import jakarta.annotation.Resource;
import org.apache.catalina.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chen
 * @since 2024-11-21
 */
@Controller
@RequestMapping("/user")
public class TestController {
/*
    @Resource
    private MQSender mqSender;

    *//*
    * 用户信息（测试）
    * *//*
    @RequestMapping("/info")
    @ResponseBody
    public RespBean info(User user) {
        return RespBean.success(user);
    }

    @RequestMapping("/mq")
    @ResponseBody
    public void mq(){
        mqSender.send("hello");
    }

    @RequestMapping("/mq/fanout")
    @ResponseBody
    public void mq01(){
        mqSender.send("hello");
    }

    @RequestMapping("/mq/direct01")
    @ResponseBody
    public void mq02(){
        mqSender.send01("hello,red");
    }

    @RequestMapping("/mq/direct02")
    @ResponseBody
    public void mq03(){
        mqSender.send02("hello,green");
    }

    @RequestMapping("/mq/topic01")
    @ResponseBody
    public void mq04(){
        mqSender.send03("hello,red");
    }

    @RequestMapping("/mq/topic02")
    @ResponseBody
    public void mq05(){
        mqSender.send04("hello,green");
    }

    @RequestMapping("/mq/headers01")
    @ResponseBody
    public void mq06(){
        mqSender.send05("hello,Header 1");
    }

    @RequestMapping("/mq/headers02")
    @ResponseBody
    public void mq07(){
        mqSender.send06("hello,Header 2");
    }*/
}
